'''
获取属性
'''
from urllib.request import urlopen
from bs4 import BeautifulSoup

html = urlopen("http://www.ivsky.com/bizhi/fengjing/")
bsObj = BeautifulSoup(html, "html.parser")

images = bsObj.findAll("div", {"class": "il_img"})
for x in images:
    print("href:", x.a.attrs["href"])
    print("src:", x.a.img.attrs["src"])
